import { DialogTable } from 'custom/index'
import { getLossCustomerStatistics, getAddCustomerStatistics } from './api'

const lossDialog = new DialogTable('DialogTable')

lossDialog
  .title('流失客户统计')
  .width('50%')
  .api(getLossCustomerStatistics)
  .useTable()
    .addIndexColumn()
    .useColumn('label').label('时间').end()
    .useColumn('value').label('客户流失量').end()
    .upto('DialogTable')
  .usePagination()

const addDialog = new DialogTable('DialogTable')

addDialog
  .title('新增客户统计')
  .width('50%')
  .api(getAddCustomerStatistics)
  .useTable()
    .addIndexColumn()
    .useColumn('label').label('时间').end()
    .useColumn('value').label('新增客户量').end()
    .upto('DialogTable')
  .usePagination()

export { lossDialog, addDialog }
